home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
dtswps.zip
/
DTSFILES.ZIP
/
EXAMPLE
/
EX1.CPP
< prev
next >
Wrap
Text File
|
1996-06-27
|
1KB
|
56 lines
// Generated from ex1.idl at 04/18/96 12:24:48 EDT
// By IBM DTS C++ implementation template emitter version 1.2
// Using hc.efw file version 1.4
#include <ex1.hh>
/*
* Begin implementation of interface EX1
*/
// default ctor for dtsdefaults
EX1::EX1()
{
}
/*
* local fcn returns the module handle for the EX1 dll
*/
static HMODULE hmod = 0;
HMODULE gethmod()
{
string path;
if (!hmod) {
path = SOMClassMgrObject->somLocateClassFile(somIdFromString("EX1"),0,0);
if (path && strlen(path))
DosQueryModuleHandle(path,&hmod);
}
return hmod;
}
// Add option to the popup menu
::BOOL EX1::wpModifyPopupMenu(::HWND hwndMenu, ::HWND hwndCnr,
::ULONG iPosition)
{
wpInsertPopupMenuItems(hwndMenu, iPosition, gethmod(), ID_EX1MENU, 0);
return (SOM_PARENT_EX1(this,wpModifyPopupMenu,WPObject,SOM_MTOKEN_WPObject(wpModifyPopupMenu))
(this, hwndMenu, hwndCnr, iPosition));
}
// Process input from the added menu option.
::BOOL EX1::wpMenuItemSelected(::HWND hwndFrame, ::ULONG ulMenuId)
{
if (ulMenuId == ID_DOEX1THING) {
DosBeep(1000,200);
DosBeep(1000,200);
DosBeep(1000,200);
DosBeep(800,400);
return 1;
}
else
return (SOM_PARENT_EX1(this,wpMenuItemSelected,WPObject,SOM_MTOKEN_WPObject(wpMenuItemSelected))
(this, hwndFrame, ulMenuId));
}